//
//  Protocol.swift
//  swift-test
//
//  Created by 梁森 on 2021/4/14.
//  Copyright © 2021 apple. All rights reserved.
//

import Foundation

import UIKit

protocol EatProtocol {
	
}

extension EatProtocol {
	
	func eat() {
		print("😊EatProtocol...")
	}
}

protocol AnotherEatProtocol { }

extension AnotherEatProtocol {
	func eat() {
		print("😊AnotherEatProtocol...")
	}
}

protocol SelfProtocol where Self: UIViewController {
	func returnSelf() -> Self
}

extension SelfProtocol {
	func returnSelf() -> Self {
		return self
	}
}



extension UIView {
	func show() {
		let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
		let tap = UITapGestureRecognizer(target: self, action: #selector(tapView))
		view.addGestureRecognizer(tap)
	}
	
	@objc func tapView() {
		
	}
}

